// 分页初始化
function loadPage(selectMethod, $scope, pageSize) {
    $('.page-container').empty();
    $('.page-container').initPage(pageSize);
    $('.page-container').bind('clickFirst',function (event,curPage,pageRow) {
        $.fn.jqLoading("destroy");
        selectMethod(curPage,pageRow,false);
        $scope.curPage = curPage;
        $scope.pageRowSize = pageRow;
    });
    $('.page-container').bind('clickPrev',function (event,curPage,pageRow) {
        $.fn.jqLoading("destroy");
        selectMethod(curPage,pageRow,false);
        $scope.curPage = curPage;
        $scope.pageRowSize = pageRow;
    });
    $('.page-container').bind('clickNext',function (event,curPage,pageRow) {
        $.fn.jqLoading("destroy");
        selectMethod(curPage,pageRow,false);
        $scope.curPage = curPage;
        $scope.pageRowSize = pageRow;
    });
    $('.page-container').bind('clickLast',function (event,curPage,pageRow) {
        $.fn.jqLoading("destroy");
        selectMethod(curPage,pageRow,false);
        $scope.curPage = curPage;
        $scope.pageRowSize = pageRow;
    });
    $('.page-container').bind('clickGo',function (event,curPage,pageRow) {
        $.fn.jqLoading("destroy");
        selectMethod(curPage,pageRow,false);
        $scope.curPage = curPage;
        $scope.pageRowSize = pageRow;
    });
    $('.page-container').bind('changeRowSize',function (event,curPage,pageRow){
        $.fn.jqLoading("destroy");
        selectMethod(curPage,pageRow,false);
        $scope.curPage = curPage;
        $scope.pageRowSize = pageRow;
    });
    selectMethod($scope.curPage,$scope.pageRowSize,true);
}

// 分页初始化
function loadPage1(findMethod, $scope, pageSize) {
    $('.page-container1').empty();
    $('.page-container1').initPage1(pageSize);
    $('.page-container1').bind('clickFirst1',function (event,curPage,pageRow) {
        $.fn.jqLoading("destroy");
        findMethod(curPage,pageRow,false);
        $scope.curPage = curPage;
        $scope.pageRowSize = pageRow;
    });
    $('.page-container1').bind('clickPrev1',function (event,curPage,pageRow) {
        $.fn.jqLoading("destroy");
        findMethod(curPage,pageRow,false);
        $scope.curPage = curPage;
        $scope.pageRowSize = pageRow;
    });
    $('.page-container1').bind('clickNext1',function (event,curPage,pageRow) {
        $.fn.jqLoading("destroy");
        findMethod(curPage,pageRow,false);
        $scope.curPage = curPage;
        $scope.pageRowSize = pageRow;
    });
    $('.page-container1').bind('clickLast1',function (event,curPage,pageRow) {
        $.fn.jqLoading("destroy");
        findMethod(curPage,pageRow,false);
        $scope.curPage = curPage;
        $scope.pageRowSize = pageRow;
    });
    $('.page-container1').bind('clickGo1',function (event,curPage,pageRow) {
        $.fn.jqLoading("destroy");
        findMethod(curPage,pageRow,false);
        $scope.curPage = curPage;
        $scope.pageRowSize = pageRow;
    });
    $('.page-container1').bind('changeRowSize1',function (event,curPage,pageRow){
        $.fn.jqLoading("destroy");
        findMethod(curPage,pageRow,false);
        $scope.curPage = curPage;
        $scope.pageRowSize = pageRow;
    });
    findMethod($scope.curPage,$scope.pageRowSize,true);
}